package com.yicong.ants.bean.task;

import android.util.ArrayMap;
import android.util.Log;

import com.yicong.ants.R;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 任务信息
 *
 * @author cch
 * @version 2020/8/25
 */
public class TaskInfo {
    public static final Map<Integer, Integer> mTaskDrawableMap = new ArrayMap<>();
    public static final Map<Integer, Integer> mYcDrawableMap = new ArrayMap<>();
    public static final Map<Integer, Integer> mYcDrawableMap2 = new ArrayMap<>();
    List<ListBean> task_list = new ArrayList<>();
    List<RecordItem> task_record = new ArrayList<>();
    List<IngBean> task_ing = new ArrayList<>();
    String remain_return = "0";
    String today_return = "0";
    String today_return_yc = "0";
    String total_return = "0";
    String task_rule;
    int today_task_times;
    int need_task_times = 7;
    boolean is_complete_task;
    boolean is_yc_task;

    static {
        mTaskDrawableMap.put(1, R.mipmap.img_me_taskpackageone);
        mTaskDrawableMap.put(2, R.mipmap.img_me_taskpackagetwo);
        mTaskDrawableMap.put(3, R.mipmap.img_me_taskpackagethree);
        mTaskDrawableMap.put(4, R.mipmap.img_me_taskpackagefour);
        mTaskDrawableMap.put(5, R.mipmap.img_me_taskpackagesix);
        mTaskDrawableMap.put(100, R.mipmap.img_me_taskpackageseven);
//        mTaskDrawableMap.put(110, R.drawable.task_110);
//        mTaskDrawableMap.put(120, R.drawable.task_120);
//        mTaskDrawableMap.put(6, R.drawable.task_6);
        mTaskDrawableMap.put(7, R.mipmap.img_me_taskpackagefive);

        mYcDrawableMap.put(1, R.mipmap.img_ycrenwu_0);
        mYcDrawableMap.put(2, R.mipmap.img_ycrenwu_1);
        mYcDrawableMap.put(3, R.mipmap.img_ycrenwu_2);
        mYcDrawableMap.put(4, R.mipmap.img_ycrenwu_3);
        mYcDrawableMap.put(5, R.mipmap.img_ycrenwu_4);
        mYcDrawableMap.put(6, R.mipmap.img_ycrenwu_5);
        mYcDrawableMap.put(7, R.mipmap.img_ycrenwu_6);

        mYcDrawableMap2.put(1, R.mipmap.img_ycrenwu_a);
        mYcDrawableMap2.put(2, R.mipmap.img_ycrenwu_b);
        mYcDrawableMap2.put(3, R.mipmap.img_ycrenwu_c);
        mYcDrawableMap2.put(4, R.mipmap.img_ycrenwu_d);
        mYcDrawableMap2.put(5, R.mipmap.img_ycrenwu_e);
        mYcDrawableMap2.put(6, R.mipmap.img_ycrenwu_f);
        mYcDrawableMap2.put(7, R.mipmap.img_ycrenwu_g);
    }

    public TaskInfo() {
    }

    public static int getTaskDrawable(String unit, int task_id) {
        if (unit.equals("yc2")) {
            if (!mYcDrawableMap2.containsKey(task_id)) {
                return R.drawable.task_1;
            }
            return mYcDrawableMap2.get(task_id);
        } else if (unit.equals("yc")) {
            if (!mYcDrawableMap.containsKey(task_id)) {
                return R.drawable.task_1;
            }
            return mYcDrawableMap.get(task_id);
        } else {
            if (!mTaskDrawableMap.containsKey(task_id)) {
                return R.drawable.task_1;
            }
            return mTaskDrawableMap.get(task_id);
        }
    }

    public boolean isIs_complete_task() {
        return is_complete_task;
    }

    public void setIs_complete_task(boolean is_complete_task) {
        this.is_complete_task = is_complete_task;
    }

    public boolean isIs_yc_task() {
        return is_yc_task;
    }

    public void setIs_yc_task(boolean is_yc_task) {
        this.is_yc_task = is_yc_task;
    }

    public String getToday_return_yc() {
        return today_return_yc;
    }

    public void setToday_return_yc(String today_return_yc) {
        this.today_return_yc = today_return_yc;
    }

    public List<ListBean> getTask_list() {
        return this.task_list;
    }

    public List<RecordItem> getTask_record() {
        return this.task_record;
    }

    public List<IngBean> getTask_ing() {
        return this.task_ing;
    }

    public String getRemain_return() {
        return this.remain_return;
    }

    public String getToday_return() {
        return this.today_return;
    }

    public String getTotal_return() {
        return this.total_return;
    }

    public String getTask_rule() {
        return this.task_rule;
    }

    public int getToday_task_times() {
        return this.today_task_times;
    }

    public int getNeed_task_times() {
        return this.need_task_times;
    }

    public boolean is_complete_task() {
        return this.is_complete_task;
    }

    public void setTask_list(List<ListBean> task_list) {
        this.task_list = task_list;
    }

    public void setTask_record(List<RecordItem> task_record) {
        this.task_record = task_record;
    }

    public void setTask_ing(List<IngBean> task_ing) {
        this.task_ing = task_ing;
    }

    public void setRemain_return(String remain_return) {
        this.remain_return = remain_return;
    }

    public void setToday_return(String today_return) {
        this.today_return = today_return;
    }

    public void setTotal_return(String total_return) {
        this.total_return = total_return;
    }

    public void setTask_rule(String task_rule) {
        this.task_rule = task_rule;
    }

    public void setToday_task_times(int today_task_times) {
        this.today_task_times = today_task_times;
    }

    public void setNeed_task_times(int need_task_times) {
        this.need_task_times = need_task_times;
    }

    public void set_complete_task(boolean is_complete_task) {
        this.is_complete_task = is_complete_task;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof TaskInfo)) return false;
        final TaskInfo other = (TaskInfo) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$task_list = this.getTask_list();
        final Object other$task_list = other.getTask_list();
        if (this$task_list == null ? other$task_list != null : !this$task_list.equals(other$task_list))
            return false;
        final Object this$task_record = this.getTask_record();
        final Object other$task_record = other.getTask_record();
        if (this$task_record == null ? other$task_record != null : !this$task_record.equals(other$task_record))
            return false;
        final Object this$task_ing = this.getTask_ing();
        final Object other$task_ing = other.getTask_ing();
        if (this$task_ing == null ? other$task_ing != null : !this$task_ing.equals(other$task_ing))
            return false;
        final Object this$remain_return = this.getRemain_return();
        final Object other$remain_return = other.getRemain_return();
        if (this$remain_return == null ? other$remain_return != null : !this$remain_return.equals(other$remain_return))
            return false;
        final Object this$today_return = this.getToday_return();
        final Object other$today_return = other.getToday_return();
        if (this$today_return == null ? other$today_return != null : !this$today_return.equals(other$today_return))
            return false;
        final Object this$total_return = this.getTotal_return();
        final Object other$total_return = other.getTotal_return();
        if (this$total_return == null ? other$total_return != null : !this$total_return.equals(other$total_return))
            return false;
        final Object this$task_rule = this.getTask_rule();
        final Object other$task_rule = other.getTask_rule();
        if (this$task_rule == null ? other$task_rule != null : !this$task_rule.equals(other$task_rule))
            return false;
        if (this.getToday_task_times() != other.getToday_task_times()) return false;
        if (this.getNeed_task_times() != other.getNeed_task_times()) return false;
        if (this.is_complete_task() != other.is_complete_task()) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof TaskInfo;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $task_list = this.getTask_list();
        result = result * PRIME + ($task_list == null ? 43 : $task_list.hashCode());
        final Object $task_record = this.getTask_record();
        result = result * PRIME + ($task_record == null ? 43 : $task_record.hashCode());
        final Object $task_ing = this.getTask_ing();
        result = result * PRIME + ($task_ing == null ? 43 : $task_ing.hashCode());
        final Object $remain_return = this.getRemain_return();
        result = result * PRIME + ($remain_return == null ? 43 : $remain_return.hashCode());
        final Object $today_return = this.getToday_return();
        result = result * PRIME + ($today_return == null ? 43 : $today_return.hashCode());
        final Object $total_return = this.getTotal_return();
        result = result * PRIME + ($total_return == null ? 43 : $total_return.hashCode());
        final Object $task_rule = this.getTask_rule();
        result = result * PRIME + ($task_rule == null ? 43 : $task_rule.hashCode());
        result = result * PRIME + this.getToday_task_times();
        result = result * PRIME + this.getNeed_task_times();
        result = result * PRIME + (this.is_complete_task() ? 79 : 97);
        return result;
    }

    public String toString() {
        return "TaskInfo(task_list=" + this.getTask_list() + ", task_record=" + this.getTask_record() + ", task_ing=" + this.getTask_ing() + ", remain_return=" + this.getRemain_return() + ", today_return=" + this.getToday_return() + ", total_return=" + this.getTotal_return() + ", task_rule=" + this.getTask_rule() + ", today_task_times=" + this.getToday_task_times() + ", need_task_times=" + this.getNeed_task_times() + ", is_complete_task=" + this.is_complete_task() + ")";
    }

    public static class ListBean {
        int task_id;
        String task_name;
        String exchange_coin;
        int tasking_amount;
        int type;
        String return_coin;
        String reward_coin;
        String duration;
        String parent_contribution;
        String weekly_max_exchange_num;
        String max_exchange_num;
        int status;
        int bg_drawable;
        int bg_bg_drawable;
        int allow_exchange_num;
        //是否有任务库存限制
        boolean is_limit;
        //剩余库存
        int stock;
        String icon_url;

        public int getAllow_exchange_num() {
            return allow_exchange_num;
        }

        public void setAllow_exchange_num(int allow_exchange_num) {
            this.allow_exchange_num = allow_exchange_num;
        }

        public ListBean() {
        }

        public boolean isType1() {
            return type == 1;
        }

        public int getBg_drawable(String unit) {
            return getTaskDrawable(unit, task_id);
        }

        public int getTask_id() {
            return this.task_id;
        }

        public String getTask_name() {
            return this.task_name;
        }

        public String getExchange_coin() {
            return this.exchange_coin;
        }

        public int getTasking_amount() {
            return this.tasking_amount;
        }

        public int getType() {
            return this.type;
        }

        public String getReturn_coin() {
            return this.return_coin;
        }

        public String getReward_coin() {
            return this.reward_coin;
        }

        public String getDuration() {
            return this.duration;
        }

        public String getParent_contribution() {
            return this.parent_contribution;
        }

        public String getWeekly_max_exchange_num() {
            return this.weekly_max_exchange_num;
        }

        public String getMax_exchange_num() {
            return this.max_exchange_num;
        }

        public int getStatus() {
            return this.status;
        }

        public void setTask_id(int task_id) {
            this.task_id = task_id;
        }

        public void setTask_name(String task_name) {
            this.task_name = task_name;
        }

        public void setExchange_coin(String exchange_coin) {
            this.exchange_coin = exchange_coin;
        }

        public void setTasking_amount(int tasking_amount) {
            this.tasking_amount = tasking_amount;
        }

        public void setType(int type) {
            this.type = type;
        }

        public void setReturn_coin(String return_coin) {
            this.return_coin = return_coin;
        }

        public void setReward_coin(String reward_coin) {
            this.reward_coin = reward_coin;
        }

        public void setDuration(String duration) {
            this.duration = duration;
        }

        public void setParent_contribution(String parent_contribution) {
            this.parent_contribution = parent_contribution;
        }

        public void setWeekly_max_exchange_num(String weekly_max_exchange_num) {
            this.weekly_max_exchange_num = weekly_max_exchange_num;
        }

        public void setMax_exchange_num(String max_exchange_num) {
            this.max_exchange_num = max_exchange_num;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public void setBg_drawable(int bg_drawable) {
            this.bg_drawable = bg_drawable;
        }

        public void setBg_bg_drawable(int bg_bg_drawable) {
            this.bg_bg_drawable = bg_bg_drawable;
        }

        public boolean isIs_limit() {
            return is_limit;
        }

        public void setIs_limit(boolean is_limit) {
            this.is_limit = is_limit;
        }

        public int getStock() {
            return stock;
        }

        public void setStock(int stock) {
            this.stock = stock;
        }

        public String getIcon_url() {
            return icon_url;
        }

        public void setIcon_url(String icon_url) {
            this.icon_url = icon_url;
        }

        public boolean equals(final Object o) {
            if (o == this) return true;
            if (!(o instanceof ListBean)) return false;
            final ListBean other = (ListBean) o;
            if (!other.canEqual((Object) this)) return false;
            if (this.getTask_id() != other.getTask_id()) return false;
            final Object this$task_name = this.getTask_name();
            final Object other$task_name = other.getTask_name();
            if (this$task_name == null ? other$task_name != null : !this$task_name.equals(other$task_name))
                return false;
            final Object this$exchange_coin = this.getExchange_coin();
            final Object other$exchange_coin = other.getExchange_coin();
            if (this$exchange_coin == null ? other$exchange_coin != null : !this$exchange_coin.equals(other$exchange_coin))
                return false;
            if (this.getTasking_amount() != other.getTasking_amount()) return false;
            if (this.getType() != other.getType()) return false;
            final Object this$return_coin = this.getReturn_coin();
            final Object other$return_coin = other.getReturn_coin();
            if (this$return_coin == null ? other$return_coin != null : !this$return_coin.equals(other$return_coin))
                return false;
            final Object this$reward_coin = this.getReward_coin();
            final Object other$reward_coin = other.getReward_coin();
            if (this$reward_coin == null ? other$reward_coin != null : !this$reward_coin.equals(other$reward_coin))
                return false;
            final Object this$duration = this.getDuration();
            final Object other$duration = other.getDuration();
            if (this$duration == null ? other$duration != null : !this$duration.equals(other$duration))
                return false;
            final Object this$parent_contribution = this.getParent_contribution();
            final Object other$parent_contribution = other.getParent_contribution();
            if (this$parent_contribution == null ? other$parent_contribution != null : !this$parent_contribution.equals(other$parent_contribution))
                return false;
            final Object this$weekly_max_exchange_num = this.getWeekly_max_exchange_num();
            final Object other$weekly_max_exchange_num = other.getWeekly_max_exchange_num();
            if (this$weekly_max_exchange_num == null ? other$weekly_max_exchange_num != null : !this$weekly_max_exchange_num.equals(other$weekly_max_exchange_num))
                return false;
            final Object this$max_exchange_num = this.getMax_exchange_num();
            final Object other$max_exchange_num = other.getMax_exchange_num();
            if (this$max_exchange_num == null ? other$max_exchange_num != null : !this$max_exchange_num.equals(other$max_exchange_num))
                return false;
            if (this.getStatus() != other.getStatus()) return false;
            if (this.getBg_drawable("") != other.getBg_drawable("")) return false;
            return true;
        }

        protected boolean canEqual(final Object other) {
            return other instanceof ListBean;
        }

        public int hashCode() {
            final int PRIME = 59;
            int result = 1;
            result = result * PRIME + this.getTask_id();
            final Object $task_name = this.getTask_name();
            result = result * PRIME + ($task_name == null ? 43 : $task_name.hashCode());
            final Object $exchange_coin = this.getExchange_coin();
            result = result * PRIME + ($exchange_coin == null ? 43 : $exchange_coin.hashCode());
            result = result * PRIME + this.getTasking_amount();
            result = result * PRIME + this.getType();
            final Object $return_coin = this.getReturn_coin();
            result = result * PRIME + ($return_coin == null ? 43 : $return_coin.hashCode());
            final Object $reward_coin = this.getReward_coin();
            result = result * PRIME + ($reward_coin == null ? 43 : $reward_coin.hashCode());
            final Object $duration = this.getDuration();
            result = result * PRIME + ($duration == null ? 43 : $duration.hashCode());
            final Object $parent_contribution = this.getParent_contribution();
            result = result * PRIME + ($parent_contribution == null ? 43 : $parent_contribution.hashCode());
            final Object $weekly_max_exchange_num = this.getWeekly_max_exchange_num();
            result = result * PRIME + ($weekly_max_exchange_num == null ? 43 : $weekly_max_exchange_num.hashCode());
            final Object $max_exchange_num = this.getMax_exchange_num();
            result = result * PRIME + ($max_exchange_num == null ? 43 : $max_exchange_num.hashCode());
            result = result * PRIME + this.getStatus();
            result = result * PRIME + this.getBg_drawable("");
            return result;
        }

        public String toString() {
            return "TaskInfo.ListBean(task_id=" + this.getTask_id() + ", task_name=" + this.getTask_name() + ", exchange_coin=" + this.getExchange_coin() + ", tasking_amount=" + this.getTasking_amount() + ", type=" + this.getType() + ", return_coin=" + this.getReturn_coin() + ", reward_coin=" + this.getReward_coin() + ", duration=" + this.getDuration() + ", parent_contribution=" + this.getParent_contribution() + ", weekly_max_exchange_num=" + this.getWeekly_max_exchange_num() + ", max_exchange_num=" + this.getMax_exchange_num() + ", status=" + this.getStatus() + ")";
        }
    }

    public static class IngBean {
        int task_id;
        String task_name;
        String exchange_coin;
        String have_return_coin;
        String duration;
        String remain_coin;
        String remain_days;
        String completed_days;
        String status_text;
        String create_time;
        int status;
        int type;
        int bg_drawable;
        int bg_bg_drawable;
        String icon_url;

        public IngBean() {
        }

        public int getBg_drawable(String unit) {
            return getTaskDrawable(unit, task_id);
        }

        public int getTask_id() {
            return this.task_id;
        }

        public String getTask_name() {
            return this.task_name;
        }

        public String getExchange_coin() {
            return this.exchange_coin;
        }

        public String getHave_return_coin() {
            return this.have_return_coin;
        }

        public String getDuration() {
            return this.duration;
        }

        public String getRemain_coin() {
            return this.remain_coin;
        }

        public String getRemain_days() {
            return this.remain_days;
        }

        public String getCompleted_days() {
            return this.completed_days;
        }

        public String getStatus_text() {
            return this.status_text;
        }

        public String getCreate_time() {
            return this.create_time;
        }

        public int getStatus() {
            return this.status;
        }

        public int getType() {
            return this.type;
        }

        public void setTask_id(int task_id) {
            this.task_id = task_id;
        }

        public void setTask_name(String task_name) {
            this.task_name = task_name;
        }

        public void setExchange_coin(String exchange_coin) {
            this.exchange_coin = exchange_coin;
        }

        public void setHave_return_coin(String have_return_coin) {
            this.have_return_coin = have_return_coin;
        }

        public void setDuration(String duration) {
            this.duration = duration;
        }

        public void setRemain_coin(String remain_coin) {
            this.remain_coin = remain_coin;
        }

        public void setRemain_days(String remain_days) {
            this.remain_days = remain_days;
        }

        public void setCompleted_days(String completed_days) {
            this.completed_days = completed_days;
        }

        public void setStatus_text(String status_text) {
            this.status_text = status_text;
        }

        public void setCreate_time(String create_time) {
            this.create_time = create_time;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public void setType(int type) {
            this.type = type;
        }

        public void setBg_drawable(int bg_drawable) {
            this.bg_drawable = bg_drawable;
        }

        public void setBg_bg_drawable(int bg_bg_drawable) {
            this.bg_bg_drawable = bg_bg_drawable;
        }

        public String getIcon_url() {
            return icon_url;
        }

        public void setIcon_url(String icon_url) {
            this.icon_url = icon_url;
        }

        public boolean equals(final Object o) {
            if (o == this) return true;
            if (!(o instanceof IngBean)) return false;
            final IngBean other = (IngBean) o;
            if (!other.canEqual((Object) this)) return false;
            if (this.getTask_id() != other.getTask_id()) return false;
            final Object this$task_name = this.getTask_name();
            final Object other$task_name = other.getTask_name();
            if (this$task_name == null ? other$task_name != null : !this$task_name.equals(other$task_name))
                return false;
            final Object this$exchange_coin = this.getExchange_coin();
            final Object other$exchange_coin = other.getExchange_coin();
            if (this$exchange_coin == null ? other$exchange_coin != null : !this$exchange_coin.equals(other$exchange_coin))
                return false;
            final Object this$have_return_coin = this.getHave_return_coin();
            final Object other$have_return_coin = other.getHave_return_coin();
            if (this$have_return_coin == null ? other$have_return_coin != null : !this$have_return_coin.equals(other$have_return_coin))
                return false;
            final Object this$duration = this.getDuration();
            final Object other$duration = other.getDuration();
            if (this$duration == null ? other$duration != null : !this$duration.equals(other$duration))
                return false;
            final Object this$remain_coin = this.getRemain_coin();
            final Object other$remain_coin = other.getRemain_coin();
            if (this$remain_coin == null ? other$remain_coin != null : !this$remain_coin.equals(other$remain_coin))
                return false;
            final Object this$remain_days = this.getRemain_days();
            final Object other$remain_days = other.getRemain_days();
            if (this$remain_days == null ? other$remain_days != null : !this$remain_days.equals(other$remain_days))
                return false;
            final Object this$completed_days = this.getCompleted_days();
            final Object other$completed_days = other.getCompleted_days();
            if (this$completed_days == null ? other$completed_days != null : !this$completed_days.equals(other$completed_days))
                return false;
            final Object this$status_text = this.getStatus_text();
            final Object other$status_text = other.getStatus_text();
            if (this$status_text == null ? other$status_text != null : !this$status_text.equals(other$status_text))
                return false;
            final Object this$create_time = this.getCreate_time();
            final Object other$create_time = other.getCreate_time();
            if (this$create_time == null ? other$create_time != null : !this$create_time.equals(other$create_time))
                return false;
            if (this.getStatus() != other.getStatus()) return false;
            if (this.getType() != other.getType()) return false;
            if (this.getBg_drawable("") != other.getBg_drawable("")) return false;
            return true;
        }

        protected boolean canEqual(final Object other) {
            return other instanceof IngBean;
        }

        public int hashCode() {
            final int PRIME = 59;
            int result = 1;
            result = result * PRIME + this.getTask_id();
            final Object $task_name = this.getTask_name();
            result = result * PRIME + ($task_name == null ? 43 : $task_name.hashCode());
            final Object $exchange_coin = this.getExchange_coin();
            result = result * PRIME + ($exchange_coin == null ? 43 : $exchange_coin.hashCode());
            final Object $have_return_coin = this.getHave_return_coin();
            result = result * PRIME + ($have_return_coin == null ? 43 : $have_return_coin.hashCode());
            final Object $duration = this.getDuration();
            result = result * PRIME + ($duration == null ? 43 : $duration.hashCode());
            final Object $remain_coin = this.getRemain_coin();
            result = result * PRIME + ($remain_coin == null ? 43 : $remain_coin.hashCode());
            final Object $remain_days = this.getRemain_days();
            result = result * PRIME + ($remain_days == null ? 43 : $remain_days.hashCode());
            final Object $completed_days = this.getCompleted_days();
            result = result * PRIME + ($completed_days == null ? 43 : $completed_days.hashCode());
            final Object $status_text = this.getStatus_text();
            result = result * PRIME + ($status_text == null ? 43 : $status_text.hashCode());
            final Object $create_time = this.getCreate_time();
            result = result * PRIME + ($create_time == null ? 43 : $create_time.hashCode());
            result = result * PRIME + this.getStatus();
            result = result * PRIME + this.getType();
            result = result * PRIME + this.getBg_drawable("");
            return result;
        }

        public String toString() {
            return "TaskInfo.IngBean(task_id=" + this.getTask_id() + ", task_name=" + this.getTask_name() + ", exchange_coin=" + this.getExchange_coin() + ", have_return_coin=" + this.getHave_return_coin() + ", duration=" + this.getDuration() + ", remain_coin=" + this.getRemain_coin() + ", remain_days=" + this.getRemain_days() + ", completed_days=" + this.getCompleted_days() + ", status_text=" + this.getStatus_text() + ", create_time=" + this.getCreate_time() + ", status=" + this.getStatus() + ", type=" + this.getType() + ")";
        }
    }

    public static class RecordItem {
        int task_id;
        String task_name;
        String have_return_coin;
        String return_coin;
        String remain_coin;
        String remain_days;
        String duration;
        String completed_days;
        String create_time;
        String dead_time;
        int status; //任务状态：2=审核中，10=进行中，20=已完成，30=已过期，40=已失效，50=冻结的不扣贡献值
        String status_text;
        int bg_drawable;

        public RecordItem() {
        }

        public int getBg_drawable(String unit) {
            return getTaskDrawable(unit, task_id);
        }

        public int getTask_id() {
            return this.task_id;
        }

        public String getTask_name() {
            return this.task_name;
        }

        public String getHave_return_coin() {
            return this.have_return_coin;
        }

        public String getReturn_coin() {
            return this.return_coin;
        }

        public String getRemain_coin() {
            return this.remain_coin;
        }

        public String getRemain_days() {
            return this.remain_days;
        }

        public String getDuration() {
            return this.duration;
        }

        public String getCompleted_days() {
            return this.completed_days;
        }

        public String getCreate_time() {
            return this.create_time;
        }

        public String getDead_time() {
            return this.dead_time;
        }

        public int getStatus() {
            return this.status;
        }

        public String getStatus_text() {
            return this.status_text;
        }

        public void setTask_id(int task_id) {
            this.task_id = task_id;
        }

        public void setTask_name(String task_name) {
            this.task_name = task_name;
        }

        public void setHave_return_coin(String have_return_coin) {
            this.have_return_coin = have_return_coin;
        }

        public void setReturn_coin(String return_coin) {
            this.return_coin = return_coin;
        }

        public void setRemain_coin(String remain_coin) {
            this.remain_coin = remain_coin;
        }

        public void setRemain_days(String remain_days) {
            this.remain_days = remain_days;
        }

        public void setDuration(String duration) {
            this.duration = duration;
        }

        public void setCompleted_days(String completed_days) {
            this.completed_days = completed_days;
        }

        public void setCreate_time(String create_time) {
            this.create_time = create_time;
        }

        public void setDead_time(String dead_time) {
            this.dead_time = dead_time;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public void setStatus_text(String status_text) {
            this.status_text = status_text;
        }

        public void setBg_drawable(int bg_drawable) {
            this.bg_drawable = bg_drawable;
        }

        public boolean equals(final Object o) {
            if (o == this) return true;
            if (!(o instanceof RecordItem)) return false;
            final RecordItem other = (RecordItem) o;
            if (!other.canEqual((Object) this)) return false;
            if (this.getTask_id() != other.getTask_id()) return false;
            final Object this$task_name = this.getTask_name();
            final Object other$task_name = other.getTask_name();
            if (this$task_name == null ? other$task_name != null : !this$task_name.equals(other$task_name))
                return false;
            final Object this$have_return_coin = this.getHave_return_coin();
            final Object other$have_return_coin = other.getHave_return_coin();
            if (this$have_return_coin == null ? other$have_return_coin != null : !this$have_return_coin.equals(other$have_return_coin))
                return false;
            final Object this$return_coin = this.getReturn_coin();
            final Object other$return_coin = other.getReturn_coin();
            if (this$return_coin == null ? other$return_coin != null : !this$return_coin.equals(other$return_coin))
                return false;
            final Object this$remain_coin = this.getRemain_coin();
            final Object other$remain_coin = other.getRemain_coin();
            if (this$remain_coin == null ? other$remain_coin != null : !this$remain_coin.equals(other$remain_coin))
                return false;
            final Object this$remain_days = this.getRemain_days();
            final Object other$remain_days = other.getRemain_days();
            if (this$remain_days == null ? other$remain_days != null : !this$remain_days.equals(other$remain_days))
                return false;
            final Object this$duration = this.getDuration();
            final Object other$duration = other.getDuration();
            if (this$duration == null ? other$duration != null : !this$duration.equals(other$duration))
                return false;
            final Object this$completed_days = this.getCompleted_days();
            final Object other$completed_days = other.getCompleted_days();
            if (this$completed_days == null ? other$completed_days != null : !this$completed_days.equals(other$completed_days))
                return false;
            final Object this$create_time = this.getCreate_time();
            final Object other$create_time = other.getCreate_time();
            if (this$create_time == null ? other$create_time != null : !this$create_time.equals(other$create_time))
                return false;
            final Object this$dead_time = this.getDead_time();
            final Object other$dead_time = other.getDead_time();
            if (this$dead_time == null ? other$dead_time != null : !this$dead_time.equals(other$dead_time))
                return false;
            if (this.getStatus() != other.getStatus()) return false;
            final Object this$status_text = this.getStatus_text();
            final Object other$status_text = other.getStatus_text();
            if (this$status_text == null ? other$status_text != null : !this$status_text.equals(other$status_text))
                return false;
            if (this.getBg_drawable("") != other.getBg_drawable("")) return false;
            return true;
        }

        protected boolean canEqual(final Object other) {
            return other instanceof RecordItem;
        }

        public int hashCode() {
            final int PRIME = 59;
            int result = 1;
            result = result * PRIME + this.getTask_id();
            final Object $task_name = this.getTask_name();
            result = result * PRIME + ($task_name == null ? 43 : $task_name.hashCode());
            final Object $have_return_coin = this.getHave_return_coin();
            result = result * PRIME + ($have_return_coin == null ? 43 : $have_return_coin.hashCode());
            final Object $return_coin = this.getReturn_coin();
            result = result * PRIME + ($return_coin == null ? 43 : $return_coin.hashCode());
            final Object $remain_coin = this.getRemain_coin();
            result = result * PRIME + ($remain_coin == null ? 43 : $remain_coin.hashCode());
            final Object $remain_days = this.getRemain_days();
            result = result * PRIME + ($remain_days == null ? 43 : $remain_days.hashCode());
            final Object $duration = this.getDuration();
            result = result * PRIME + ($duration == null ? 43 : $duration.hashCode());
            final Object $completed_days = this.getCompleted_days();
            result = result * PRIME + ($completed_days == null ? 43 : $completed_days.hashCode());
            final Object $create_time = this.getCreate_time();
            result = result * PRIME + ($create_time == null ? 43 : $create_time.hashCode());
            final Object $dead_time = this.getDead_time();
            result = result * PRIME + ($dead_time == null ? 43 : $dead_time.hashCode());
            result = result * PRIME + this.getStatus();
            final Object $status_text = this.getStatus_text();
            result = result * PRIME + ($status_text == null ? 43 : $status_text.hashCode());
            result = result * PRIME + this.getBg_drawable("");
            return result;
        }

        public String toString() {
            return "TaskInfo.RecordItem(task_id=" + this.getTask_id() + ", task_name=" + this.getTask_name() + ", have_return_coin=" + this.getHave_return_coin() + ", return_coin=" + this.getReturn_coin() + ", remain_coin=" + this.getRemain_coin() + ", remain_days=" + this.getRemain_days() + ", duration=" + this.getDuration() + ", completed_days=" + this.getCompleted_days() + ", create_time=" + this.getCreate_time() + ", dead_time=" + this.getDead_time() + ", status=" + this.getStatus() + ", status_text=" + this.getStatus_text() + ")";
        }
    }
}
